partial class RO_DIGRAPH_INCL{NTP} < $RO_DIGRAPH{NTP} |
---|
**** | Partial class used to define other routines in digraphs Usage:
_____g:_DIGRAPH{INT}_:=_#; _____g.add_node(1).add_node(2).add_node(3).connect(1,2).connect(1,3); _____Constructs: ______1 ______/\ _____2__3 ____Getting_the_nodes_in_depth_first_order: _______l:LIST{INT}_:=_#; _______loop_n:_INT_:=_DAG_ALG{INT,_DIGRAPH{INT}}::dfs!(g); ___________l_:=_l.append(n); ________end; |
$RO_DIGRAPH{_} | $GRAPH{_,_} | $STR | $ELT{_} | $ELT |
FILTERGRAPH_DIGRAPH_VIEW{_,_} | FILTERGRAPH_DIGRAPH_VIEW{_} | DIGRAPH_INCL{_} | DIGRAPH_REV_DIGRAPH_VIEW{_,_} | DIGRAPH_REV_DIGRAPH_VIEW{_} | DIGRAPH{_} | LBLD_DIGRAPH{_,_,_} | WTD_DIGRAPH{_,_} |
copy: $DIGRAPH{NTP} |
---|
equals(g: $RO_DIGRAPH{NTP}):BOOL |
---|
**** | True if both have the same set of nodes and edges |
has(n: NTP): BOOL |
---|
stub has_edge(e: DIEDGE{NTP}): BOOL; |
---|
stub has_node(n: NTP): BOOL; |
---|
is_empty: BOOL |
---|
n_adjacent(n:NTP): INT |
---|
stub n_edges: INT; |
---|
stub n_incoming(n: NTP): INT; |
---|
stub n_nodes: INT; |
---|
stub n_outgoing(n: NTP): INT; |
---|
size: INT |
---|
str: STR |
---|
**** | Print out the graph using the bound routine "f" for the nodes |
adjacent!(once n: NTP): NTP |
---|
**** | Adjacent is aliased to "outgoing" |
stub edge!: DIEDGE{NTP}; |
---|
elt!: NTP |
---|
**** | Returns the nodes of the graph |
stub incoming!(once n: NTP): NTP; |
---|
stub node!: NTP; |
---|
stub outgoing!(once n: NTP): NTP; |
---|
node_str(n: NTP): STR |
---|
**** | There should not be void nodes in the graph! |